<?php
$str = "he000llo123-php8程序";
echo preg_replace("/\d+/", "=", $str), "<br>";
echo preg_replace("/\d+/", "", $str), "<br>";

//删除数组里边元素的数组
$arr = ["php100", "hello-100php", "python", 'php123'];
echo '<pre>';
print_r($arr);
print_r(preg_replace("/\d+/", "", $arr));

//选出含有php的元素，组成新数组
print_r(preg_grep("/php/", $arr));